<?php

// todo::链接数据库
$mysqli = @new mysqli("127.0.0.1", "root", "root", "school");
//判断是否正确
if($mysqli->connect_errno){
	exit('数据链接失败：'.$mysqli->connect_error);
}
// todo :: 告诉mysql 编码
$mysqli->query("set names utf8");

// 准备
$stmp = $mysqli->prepare("insert into stu (name,age) values(?,?)");

if($stmp){

	$stmp->bind_param('sd', $name, $age);

	for ($i=0; $i <200 ; $i++) { 
		$name = "小马".$i;
		$age = 90;
		$stmp->execute();
	}
	
}


